import http from "@/utils/request";

export default{
    //获取抽油机设备档案数据列表
    //查询
    async getCyjsbdaList(pageNo,pageSize,approveStatus,startDate,endDate){
        return await http.get("/api/cyjsbda/list",{pageNo,pageSize,approveStatus,startDate,endDate});
    },
    //抽油机保养计划数据列表
    async getList(pageNo,pageSize,startDate,endDate){
        return await http.get("/api/scCyjByjh/list",{pageNo,pageSize,startDate,endDate});
    },
    
    //新增抽油机设备档案数据
    //添加
    async addCyjsbda(params){
        // console.log(1);
        return await http.post("/api/cyjsbda/add",params)
    },
    //修改抽油机设备档案(审核)抽油机设备档案数据
    //修改
    async updateCyjsbda(params){
        // console.log(29999999);
        return await http.put("/api/cyjsbda/update",params)
    },
    //上传文件
    async importExcel(myfile){
        // console.log(29999999);
        console.log(myfile.get("myfile"));

        return await http.upload("/api/fileAbout/fileUpload",{myfile})
    },
    //导入文件
    async batchImportExcel(filePath){
        // console.log(typeof(filePath));
        // console.log(filePath.get("filePath"));
        return await http.upload("/api/cyjsbda/batchInput",{filePath})
    },
    //下载模板
    async download(params){
        // console.log(1);
        return await http.get("/api/cyjsbda/downLoadExcel",params)
    },
    async delete(params) {
        // return Request.get('/slzzzb/all', params);
        // return Request.get('/QtccxZbhz/all', startDate,endDate);
        return await http.delete('/api/cyjsbda/delete', params);
    }
}